<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

	上传成功！


<!-- /springmvc/file/download
 -->
<a href="/springmvc/file/download.do">下载</a>

</body>
</html>


<script src="/springmvc/js/jquery.min.js"></script>

<script>
//http://localhost:8080/springmvc/file/getImgName.do

$.ajax({
	url: "/springmvc/file/getImgName.do",
	dataType: "json",
	success: function(data) {
		// alert(data.img)
		var filePath = "/springmvc/upload/" + data.img;
		
		// 利用 jQuery生成1张图片
		var oImg = $('<img src="'   + filePath +  '" />')
		
		// 添加到body元素
		$("body").append(oImg);
	}
})	
	

</script>


